﻿using BCCommon;
using BCCommon.FreightEnums;
using BCDto.Common.Area;
using BCDto.Sim.Admin.Admin;
using System;
using System.Collections.Generic;
using System.Text;

namespace BCService.Common.Area
{
    /// <summary>
    /// 城市信息
    /// </summary>
    public interface ICityService
    {
        /// <summary>
        /// 添加城市信息
        /// </summary>
        /// <param name="dto">城市请求信息</param>
        /// <param name="adminDto"></param>
        /// <returns></returns>
        bool Add(CityRequestDto dto,AdminDto adminDto);
        /// <summary>
        /// 修改城市信息
        /// </summary>
        /// <param name="dto">城市请求信息</param>
        /// <param name="adminDto"></param>
        void Update(CityPutDto dto, AdminDto adminDto);
        /// <summary>
        /// 删除城市信息
        /// </summary>
        /// <param name="cityCode">城市Id</param>
        void Delete(string cityCode);
        /// <summary>
        /// 获取城市信息单条
        /// </summary>
        /// <param name="cityId">城市Id</param>
        /// <returns></returns>
        CityDto Get(long cityId);
        /// <summary>
        /// 获取城市信息单条
        /// </summary>
        /// <param name="cityCode">城市编码</param>
        /// <returns></returns>
        CityDto Get(string cityCode);
        /// <summary>
        /// 获取城市列表
        /// </summary>
        /// <param name="provinceCode">省份编码</param>
        /// <param name="cityCode">市编码</param>
        /// <param name="index">当前页码</param>
        /// <param name="size">每页数据条数</param>
        /// <returns></returns>
        PageableList<CityDto> Get(string provinceCode, string cityCode,int index, int size);
        /// <summary>
        /// 更新城市名称首字母
        /// </summary>
        void UpdateCityInitials();
        /// <summary>
        /// 获取城市列表--首字母分组
        /// </summary>
        /// <returns></returns>
        IEnumerable<CityViewDto> GetCitiesInitialsGroup();
        /// <summary>
        /// 获取热门城市列表
        /// </summary>
        /// <returns></returns>
        IEnumerable<CityViewDto> GetHotCities();
        /// <summary>
        /// 修改城市议价
        /// </summary>
        /// <param name="cityCode">城市编码</param>
        /// <param name="businessType">业务类型</param>
        /// <param name="isNegotiatedPrice">需要议价</param>
        /// <returns></returns>
        void UpdateCityNegotiatedPrice(string cityCode, FreightBusinessType businessType, bool isNegotiatedPrice);

        /// <summary>
        /// 更新市信息
        /// </summary>
        /// <param name="editer">编辑人</param>
        /// <param name="cityCode">市编码</param>
        /// <param name="provinceCode">省编码</param>
        /// <param name="provinceName">省名称</param>
        /// <param name="cityName">市名称</param>
        /// <param name="longitude">经度</param>
        /// <param name="latitude">纬度</param>
        /// <param name="batchNo">批号</param>
        CityDto UpdateCity(string editer, string cityCode, string cityName, string provinceCode,string provinceName, double longitude, double latitude, string batchNo);

        /// <summary>
        /// 不存在新地图信息插入未匹配上的数据
        /// </summary>
        /// <param name="batchNo">批号</param>
        bool UpdateIsEnabled(string batchNo);
    }
}
